#ifndef AVALON_MOCKSERVICELOCATORSERVERCOMPONENTS_HPP
#define AVALON_MOCKSERVICELOCATORSERVERCOMPONENTS_HPP
#include "Avalon/IOTests/IOTests.hpp"
#include "Avalon/ServiceLocator/ServiceLocator.hpp"
#include "Avalon/ServiceLocatorTests/ServiceLocatorTests.hpp"

namespace Avalon {
namespace ServiceLocator {
namespace Tests {

  /*! \class MockServiceLocatorServerComponents
   *  \brief Contains components needed to create a mock ServiceLocator server.
   *  \author Kamal Mansouri <kranar@hotmail.com>
   */
  class MockServiceLocatorServerComponents {
    public:

      //! Constructs the MockServiceLocatorServerComponents.
      MockServiceLocatorServerComponents();

      ~MockServiceLocatorServerComponents();

      //! Returns the MockServerConnection component.
      IO::Tests::MockServerConnection& GetServerConnection();

      //! Returns the MockServiceLocatorDataStore component.
      MockServiceLocatorDataStore& GetDataStore();

      //! Returns the ServiceLocatorServer component.
      ServiceLocatorServer& GetServer();

    private:
      friend class MockServiceLocatorClientComponents;
      IO::Tests::MockServerConnection* m_serverConnection;
      MockServiceLocatorDataStore* m_dataStore;
      boost::scoped_ptr<ServiceLocatorServer> m_server;
  };
}
}
}

#endif // AVALON_MOCKSERVICELOCATORSERVERCOMPONENTS_HPP
